<template>
	<myView>
		<u-form-item :label="label" :prop="prop">
			<u-input v-model="data" />
		</u-form-item>
	</myView>
</template>

<script>
	export default {
		name:"myFromInput",
		props:{
			value:{
				type:[String,Number],
				default:''
			},
			label:{
				type: String,
				default:''
			},
			prop:{
				type: String,
				default:'name',
			}
		},
		data() {
			return {
				data:''
			};
		},
		watch:{
			value:{
				immediate: true,
				deep: true,
				handler(val){
					this.data=val;
				}
			},
			data(val){
				this.$emit('input',val);
			}
		}
	}
</script>

<style lang="scss" scoped>

</style>